/**
 * @author 赵希奥
 * @date 2022/4/19 1:29
 * @gitHub https://github.com/CKXGZXA
 * @gitee https://gitee.com/ckxgzxa
 * @description:
 */
public class Client {
    public static void main(String[] args) {
        Officer zhangsan, lisi, wangwu;
        zhangsan = new BanZhang("张三");
        lisi = new PaiZhang("李四");
        wangwu = new YingZhang("王五");

        // 创建职责链
        zhangsan.setSuccessor(lisi);
        lisi.setSuccessor(wangwu);

        // 创建作战请求
        MissionRequest mr1 = new MissionRequest(6);
        zhangsan.processRequest(mr1);

        MissionRequest mr2 = new MissionRequest(25);
        zhangsan.processRequest(mr2);

        MissionRequest mr3 = new MissionRequest(100);
        zhangsan.processRequest(mr3);

        MissionRequest mr4 = new MissionRequest(243);
        zhangsan.processRequest(mr4);
    }
}
